Skip to content

updates to swift 3.0 and xcode 8.1#48

Open
tiagomartinho wants to merge 5 commits intoturowicz:masterfrom
elit-software:master
Open

updates to swift 3.0 and xcode 8.1#48
tiagomartinho wants to merge 5 commits intoturowicz:masterfrom
elit-software:master

Conversation

@tiagomartinho
Copy link

@tiagomartinho tiagomartinho commented Nov 4, 2016

I updated the project to Swift 3.0, however the serialisation of enum does not work.

I also updated the pod spec that had the invalid platform keyword.


it("should be serialized") {
let expected = "[{\"kind\":\"Dog\",\"nickname\":\"Fluffy\",\"trick\":\"Rollover\"},{\"kind\":\"Cat\",\"nickname\":\"Purry\"}]"
let expected = "[{\"kind\":\"Dog\",\"nickname\":\"Fluffy\",\"trick\":\"Rollover\"},{\"kind\":\"Cat\",\"nickname\":\"Purry\",\"trick\":null}]"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 150 characters or less: currently 157 characters (line_length)

:returns: The array as a JSON string.
*/
public func toJsonString(prettyPrinted: Bool = false) -> String? {
public func toJsonString(_ prettyPrinted: Bool = false) -> String? {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid Docs Violation: Documented declarations should be valid. (valid_docs)

:returns: The array as JSON, wrapped in NSData.
*/
public func toJson(prettyPrinted: Bool = false) -> NSData? {
public func toJson(_ prettyPrinted: Bool = false) -> Data? {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid Docs Violation: Documented declarations should be valid. (valid_docs)

@turowicz
Copy link
Owner

turowicz commented Nov 7, 2016

Thanks for the PR @tiagomartinho

Can someone verify this? I haven't touched anything in Swift for over 2 years now.


it("should be serialized") {
let expected = "[{\"kind\":\"Dog\",\"nickname\":\"Fluffy\",\"trick\":\"Rollover\"},{\"kind\":\"Cat\",\"nickname\":\"Purry\"}]"
let expected = "[{\"kind\":\"Dog\",\"nickname\":\"Fluffy\",\"trick\":\"Rollover\"},{\"kind\":\"Cat\",\"nickname\":\"Purry\",\"trick\":null}]"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 150 characters or less: currently 157 characters (line_length)


it("should be serialized") {
let expected = "[{\"kind\":\"Dog\",\"nickname\":\"Fluffy\",\"trick\":\"Rollover\"},{\"kind\":\"Cat\",\"nickname\":\"Purry\"}]"
let expected = "[{\"kind\":\"Dog\",\"nickname\":\"Fluffy\",\"trick\":\"Rollover\"},{\"kind\":\"Cat\",\"nickname\":\"Purry\",\"trick\":null}]"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 150 characters or less: currently 157 characters (line_length)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants